﻿#include<iostream>
#include<iomanip>
using namespace std;
int main() {
	cout << fixed;//小数计数法
	cout << 3.14 << endl;
	cout << 3.14 << endl;

	cout << scientific;//科学计数法
	cout << 3.14 << endl;
	cout << 3.14 << endl;

	cout << defaultfloat;//小数输出
	cout << 3.14 << endl;

	cout << setprecision(5);//设置小数精度
	cout << 3.1415926 << endl;

	cout << showbase;//显示十六进制和八进制前缀
	cout << noshowbase;//取消显示十六进制和八进制前缀

	cout << hex;//十六进制输出
	cout << 65535 << endl;
	cout << (long long)65535 * 65535 << endl;

	cout << oct;//八进制输出
	cout << 65535 << endl;
	cout << (long long)65535 * 65535 << endl;

	cout << left;//左对齐
	cout << right;//右对齐

	cout << dec;//十进制输出
	cout << setw(10);//设置宽度输出，设置一次用一次
	cout << 65535 << endl;
	cout << 535 << endl;

	cout << setfill('*') << setw(10) << 1241 << endl;//显示宽度超过字符宽度时，指定字符串填充剩余内容


}